/**
 * 建造者模式
 */

package com.study.s07.builder;

import com.study.s07.builder.model.House;

public class MainClass {
	
	public static void main(String arg[]){
		
		//直接建房子
//		House house = new House();
//		house.setFloor("普通地板");
//		house.setHousetop("普通的屋顶");
//		house.setWall("水泥墙");
		
		//选择低级工程队
		//HouseBuilder builder = new NormalBuilder();
		//选择高级工程队
		HouseBuilder builder = new HighlevelBuilder();
		//选择设计师
//		HouseDicretor dicretor = new HouseDicretor(builder);
//		dicretor.makeHouse();
		//设计师优化
		HouseDicretor dicretor = new HouseDicretor();
		dicretor.makeHouse(builder);
		
		House house = builder.getHouse();
		System.out.println(house.getFloor());
	}
}
